package com.swyc.osschat.Test.designMode.chainOfResponsibility.strategy;

import com.swyc.osschat.Test.designMode.chainOfResponsibility.base.Leader;

/**
 * @description 具体处理者：组长类
 * @Author: z156940l@outlook.com
 * @className GroupLeader
 * @Date: 2022/6/27 9:48
 */
public class GroupLeader extends Leader {
    @Override
    public void handlerRequest(int days) {
        if (days==1){
            System.out.println("组长批准了请假："+days+"天");
        }else {
            if (getNextLeader()!=null){
                getNextLeader().handlerRequest(days);
            }
        }
    }
}
